using System.Data;
using Firestarter.DB.Schema.Logic;

namespace Firestarter.DB.Schema.Test.Logic
{
    public class DBSchemaExtractor_Fake : IDBSchemaExtractor
    {
        public DataTable DataTypesDataTable { get; set; }
        public DataTable DatabasesDataTable { get; set; }
        public DataTable TablesDataTable { get; set; }
        public DataTable ColumnsDataTable { get; set; }
        public DataTable PrimaryKeysDataTable { get; set; }
        public DataTable UniqueKeysDataTable { get; set; }
        public DataTable ForeignKeysDataTable { get; set; }

        /// <summary>
        /// Gets the current Catalog Name from the database connection.
        /// </summary>
        public string CatalogName
        {
            get { return null; }
        }

        /// <summary>
        /// Gets the current Schema Name from the database connection.
        /// </summary>
        public string SchemaName
        {
            get { return null; }
        }

        public DataTable GetDatabasesDataTable(string databaseName)
        {
            return DatabasesDataTable;
        }

        public DataTable GetDatabasesDataTable(string catalogName, string schemaName)
        {
            return DatabasesDataTable;
        }

        public DataTable GetDataTypesDataTable()
        {
            return DataTypesDataTable;
        }

        public DataTable GetTablesDataTable()
        {
            return TablesDataTable;
        }

        public DataTable GetColumnsDataTable(string tableName)
        {
            return ColumnsDataTable;
        }

        public DataTable GetPrimaryKeyColumnsDataTable(string tableName)
        {
            return PrimaryKeysDataTable;
        }

        public DataTable GetUniqueKeyColumnsDataTable(string tableName)
        {
            return UniqueKeysDataTable;
        }

        public DataTable GetForeignKeyColumnsDataTable(string tableName, string foreignKeyName)
        {
            return ForeignKeysDataTable;
        }
    }
}